home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / GBOXDRW2.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  58 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   GBOXDRW2.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NBV1.INC"
  22. SCREEN 12
  23. CLS
  24. GraphicSETUP
  25. COLOR 7, 0
  26.  
  27. ? "┌─────────────────────────────────────────────────────────────────────────
  28. ? "│ GBoxDRAWtt ( C1%, R1%, C2%, R2%, Mask%, Tclr?, Bclr? )
  29. ? "│
  30. ? "│ PURPOSE: draw a one pixel box border with two colors
  31. ? "│          this makes drawing shadowed boxes one call instead of 4
  32. ? "│  PARAMS:   C1% left-most column ( 0 -> 639 )
  33. ? "│            R1% top most row     ( 0 -> 479 )
  34. ? "│            C2% right most column
  35. ? "│            R2% bottom most row
  36. ? "│          Mask% bit-mapped mask for ON/OFF pixels but 0 = Solid border
  37. ? "│            Tc? top/left color   ( 0 -> 15 )
  38. ? "│            Bc? bottom/right     ( 0 -> 15 )
  39. ? "└─────────────────────────────────────────────────────────────────────────
  40. DELAY 1
  41.                                              '┌──────────────────────────────
  42. C1% = 270  :  C2% = C1% + 99                 '│ box corners
  43. R1% = 220  :  R2% = R1% + 99                 '│
  44.                                              '│
  45. BorderWidth% = 4                             '│ border width in pixels
  46.                                              '│
  47. FOR X% = 1 TO BorderWidth%                   '│ draw the border
  48.   GBoxDRAWtt C1%, R1%, C2%, R2%, 0, 11, 1    '│ two-toned box
  49.   INCR C1%, 1  : DECR C2%, 1                 '│ move in for next box
  50.   INCR R1%, 1  : DECR R2%, 1                 '│
  51. NEXT                                         '│
  52. GBoxFILL   C1%, R1%, C2%, R2%, "", 3,  9     '│ fill inside of box
  53. GBoxDRAWtt C1%, R1%, C2%, R2%, 0 , 1, 11     '│ draw "lip" of the button
  54.                                              '│
  55. WHILE NOT INSTAT : WEND                      '│
  56. CLS                                          '│
  57. SCREEN 0                                     '└─────────────────────────────
  58.